package tw.com.msig.jaxb;

import java.util.List;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

@XmlRootElement
@XmlType(propOrder = { "policyNo", "insureds" })
public class Policy {

	Long id;
	String policyNo;
	List<Insured> insureds;

	@Override
	public String toString() {
		return "Policy [id=" + id + ", policyNo=" + policyNo + ", insureds="
				+ insureds + "]";
	}

	public Long getId() {
		return id;
	}

	@XmlAttribute
	public void setId(Long id) {
		this.id = id;
	}

	public String getPolicyNo() {
		return policyNo;
	}

	@XmlElement(name = "policyNumber")
	public void setPolicyNo(String policyNo) {
		this.policyNo = policyNo;
	}

	public List<Insured> getInsureds() {
		return insureds;
	}

	public void setInsureds(List<Insured> insureds) {
		this.insureds = insureds;
	}

}
